<?php
class View {
    public static function render($viewFile = '', $variables = array()) {
        require HAMSTER_PATH . 'vendor' . DS . 'Twig' . DS . 'Autoloader' . EXT;
        Twig_Autoloader::register();
        $loader = new Twig_Loader_Filesystem(APP_PATH . 'view');
        $twig = new Twig_Environment($loader, array(
            'cache' => APP_PATH . 'cache',
            'auto_reload' => true,
        ));
        echo $twig->render($viewFile, $variables);
    }
}